home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20031118-20041115 / 000416_fdc@columbia.edu_Tue Oct 19 14:26:12 2004.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Path: newsmaster.cc.columbia.edu!not-for-mail
  2. From: Frank da Cruz <fdc@columbia.edu>
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: Kermit Script Output Out of Order
  5. Date: 19 Oct 2004 18:25:05 GMT
  6. Organization: Columbia University
  7. Lines: 30
  8. Message-ID: <slrncnan01.3s1.fdc@sesame.cc.columbia.edu>
  9. References: <cl29ql$dm7$1@zcars0v6.ca.nortel.com>
  10. Reply-To: fdc@columbia.edu
  11. NNTP-Posting-Host: sesame.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1098210305 13272 128.59.59.56 (19 Oct 2004 18:25:05 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 19 Oct 2004 18:25:05 GMT
  15. User-Agent: slrn/0.9.8.0 (SunOS)
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15199
  17.  
  18. On 2004-10-19, Robert Simmons <robertls@nortelnetworks.com> wrote:
  19. : Hopefully this group is still monitored...
  20. :
  21. Of course.
  22.  
  23. : I have been developing a kermit script.  I have found that when a run the
  24. : script normally from a linux prompt that the output is mostly in order.  But
  25. : if I fork a process and run the script from a C++ program the output is in
  26. : realtime for the AT responces but the script echo lines and the help text
  27. : output is not dumped until the process is killed or dies.
  28. :
  29. : I notices the same order of output with the stdout redirected and captured
  30. : to a file at the linux command prompt.
  31. :
  32. : Anyone know why? And how to get the output os the echo statements to be dump
  33. : before the script dies or is killed?
  34. :
  35. C-Kermit was not really intended to be controlled by another process.
  36. When you use Kermit itself as your scripting tool, which is adequate for
  37. most purposes:
  38.  
  39.   http://www.columbia.edu/kermit/ckscripts.html
  40.  
  41. you don't get the jumbled output.
  42.  
  43. For historical (and to some extent practical) reasons, there is a mixture
  44. of buffered and unbuffered writes to stdout.  If your process is reading
  45. C-Kermit's stdout, maybe it needs to read it in unbuffered mode?
  46.  
  47. - Frank